﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Combat/Combat.master" AutoEventWireup="true"
    CodeFile="InsertExam.aspx.cs" Inherits="Aptitude_InsertExam" StylesheetTheme="Content" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        //<![CDATA][
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        //]]>
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ul class="topmenu">
        <li>题目：<asp:TextBox ID="txtYear" runat="server" Width="94px"></asp:TextBox>
            &nbsp;年&nbsp;
            <asp:DropDownList ID="ddlCount" runat="server">
                <asp:ListItem></asp:ListItem>
                <asp:ListItem Value="1">上半年</asp:ListItem>
                <asp:ListItem Value="2">下半年</asp:ListItem>
            </asp:DropDownList>
        </li>
        <li>
            <asp:TextBox ID="txtSubject" runat="server" Width="224px"></asp:TextBox></li><li>
                <asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" Text="查询" Width="30px" /></li>
        <li><a href="UpdateExam.aspx">添加</a></li>
    </ul>
    <div>
        <asp:GridView ID="gvExamSubject" runat="server" AutoGenerateColumns="False" DataKeyNames="ExamID"
            OnRowDeleting="gvExamSubject_RowDeleting" OnRowDataBound="gvExamSubject_RowDataBound"
            AllowPaging="True" OnPageIndexChanging="gvExamSubject_PageIndexChanging" Caption="<span>考核题目列表</span>"
            OnRowCommand="gvExamSubject_RowCommand" PageSize="15">
            <Columns>
                <asp:TemplateField>
                    <HeaderStyle HorizontalAlign="Left" Width="5%" />
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblID"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ExamYear" HeaderText="年份" ItemStyle-Width="10%">
                    <ItemStyle Width="10%"></ItemStyle>
                </asp:BoundField>
                <asp:TemplateField HeaderText="阶段">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("ExamCount").ToString()=="1"?"上半年":"下半年" %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="10%" />
                </asp:TemplateField>
                <asp:BoundField DataField="AptitudeExamSubject" HeaderText="标题" />
                <asp:TemplateField HeaderText="编辑">
                    <ItemTemplate>
                        <a href="UpdateExam.aspx?ID=<%# Eval("ExamID") %>">
                            <img alt="编辑" src="../../Images/Edit.gif" /></abbr></a>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:ImageButton runat="server" CommandArgument='<%# Eval("ExamID") %>' ID="lkbDel"
                            CommandName="Del" ImageUrl="~/Images/delete.gif" OnClientClick="return confirm('是否真的删除?')">
                        </asp:ImageButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Left" />
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>
        <asp:HiddenField ID="TotalCount" runat="server" />
        <uc1:ListPageContral ID="ListPageContral1" runat="server" PageSize="15" OnPageSizeChange="ListPageContral1_PageSizeChange" />
        <br />
        <asp:Label runat="server" ID="lblwhere" Visible="False"></asp:Label><div class="prompt">
            <asp:Label ID="Prompt" runat="server"></asp:Label></div>
    </div>
</asp:Content>
